#pragma once
#include "libutilsbase.h"
#include "ustringutils.h"
#include "IQuoteService.h"
//
//#ifdef QUOTEADAPTERTDF_EXPORTS
//#define TDFAPI __declspec(dllexport)
//#else
//#define TDFAPI __declspec(dllimport)
//#endif

struct  TDFParamA
{
	std::string addr;
	int				 port;
	std::string usr;
	std::string pwd;

	int date;
	tstrings products;
	
};

class CTDFQuoteAdapter : public IQuoteService
{
public:
	CTDFQuoteAdapter(void);
	virtual ~CTDFQuoteAdapter(void);
public:
	bool Initialize(void* param);

	virtual bool InitializeByXML( const TCHAR* pPath );

	virtual void UnInitialize();

	virtual bool SubscribeQuote_CTP( const TCHAR* Key,OnCTPQuoteRecieved callback );

	virtual void UnSubscribeQuote_CTP( const TCHAR* Key,OnCTPQuoteRecieved callback );

	virtual bool GetLastError( std::pair<int,tstring>* perr );

	 
};
